/*
 * Copyright 2008 Max Kugland
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.splink.library.logging {

	/**
	 * Represents a <code>LogRange</code> which is used to filter <code>LogEvent</code>s which
	 * are not within the defined <code>LogRange</code>.
	 * 
	 * @see LogEvent
	 * @author Max Kugland
	 */
	public class LogRange {
		private var _low : int;
		private var _high : int;

		/**
		 * @param low Lower end of the <code>LogRange</code>. Feed with constans from <code>LogLevel</code> 
		 * @param high Higher end of the <code>LogRange</code>. Feed with constans from <code>LogLevel</code> 
		 */
		public function LogRange(low : int, high : int) {
			_low = low;
			_high = high;
		}

		/**
		 * Lower end of the <code>LogRange</code> all <code>LogEvent</code> with a <code>LogLevel</code> 
		 * below that level are filtered out.
		 * 
		 * @return the lower end of the <code>LogRange</code>
		 */
		public function getLow() : int {
			return _low;
		}

		/**
		 * Higher end of the <code>LogRange</code> all <code>LogEvent</code> with a <code>LogLevel</code> 
		 * higher than that level are filtered out.
		 * 
		 * @return the higher end of the <code>LogRange</code>
		 */
		public function getHigh() : int {
			return _high;
		}
	}
}
